package math

import (
	"go_gvm_mini/instructions/base"
	"go_gvm_mini/rtda"
)

type IINCR struct {
	base.Index8Instruction
	Const int32
}

func (self *IINCR) Execute(jFrame *rtda.JFrame) {
	localVars := jFrame.LocalVars()
	val := localVars.GetInt(self.Index)
	val += self.Const
	localVars.SetInt(self.Index, val)
}
